home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / OSAGeneric.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  4KB  |  110 lines

  1. /*
  2.      File:        OSAGeneric.h
  3.  
  4.      Contains:    AppleScript Generic Component Interfaces.
  5.  
  6.      Version:    Technology:    AppleScript 1.1
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __OSAGENERIC__
  19. #define __OSAGENERIC__
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. #ifndef __APPLEEVENTS__
  25. #include <AppleEvents.h>
  26. #endif
  27. #ifndef __OSA__
  28. #include <OSA.h>
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT_SUPPORTED
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_ALIGN_SUPPORTED
  40. #pragma options align=mac68k
  41. #endif
  42.  
  43. #if FOR_SYSTEM7_ONLY
  44. /*
  45.      NOTE:    This interface defines a "generic scripting component."
  46.             The Generic Scripting Component allows automatic dispatch to a
  47.             specific scripting component that conforms to the OSA interface.
  48.             This component supports OSA, by calling AppleScript or some other 
  49.             scripting component.  Additionally it provides access to the default
  50.             and the user-prefered scripting component.
  51. */
  52.  
  53. enum {
  54.                                                                 /* Component version this header file describes */
  55.     kGenericComponentVersion    = 0x0100
  56. };
  57.  
  58.  
  59. enum {
  60.     kGSSSelectGetDefaultScriptingComponent = 0x1001,
  61.     kGSSSelectSetDefaultScriptingComponent = 0x1002,
  62.     kGSSSelectGetScriptingComponent = 0x1003,
  63.     kGSSSelectGetScriptingComponentFromStored = 0x1004,
  64.     kGSSSelectGenericToRealID    = 0x1005,
  65.     kGSSSelectRealToGenericID    = 0x1006,
  66.     kGSSSelectOutOfRange        = 0x1007
  67. };
  68.  
  69. typedef OSType ScriptingComponentSelector;
  70. typedef OSAID GenericID;
  71. /* get and set the default scripting component */
  72. extern pascal OSAError OSAGetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector *scriptingSubType)
  73.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x1001, 0x7000, 0xA82A);
  74.  
  75. extern pascal OSAError OSASetDefaultScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType)
  76.  FIVEWORDINLINE(0x2F3C, 0x0004, 0x1002, 0x7000, 0xA82A);
  77.  
  78. /* get a scripting component instance from its subtype code */
  79. extern pascal OSAError OSAGetScriptingComponent(ComponentInstance genericScriptingComponent, ScriptingComponentSelector scriptingSubType, ComponentInstance *scriptingInstance)
  80.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1003, 0x7000, 0xA82A);
  81.  
  82. /* get a scripting component selector (subType) from a stored script */
  83. extern pascal OSAError OSAGetScriptingComponentFromStored(ComponentInstance genericScriptingComponent, const AEDesc *scriptData, ScriptingComponentSelector *scriptingSubType)
  84.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1004, 0x7000, 0xA82A);
  85.  
  86. /* get a real component instance and script id from a generic id */
  87. extern pascal OSAError OSAGenericToRealID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance *theExactComponent)
  88.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1005, 0x7000, 0xA82A);
  89.  
  90. /* get a generic id from a real component instance and script id */
  91. extern pascal OSAError OSARealToGenericID(ComponentInstance genericScriptingComponent, OSAID *theScriptID, ComponentInstance theExactComponent)
  92.  FIVEWORDINLINE(0x2F3C, 0x0008, 0x1006, 0x7000, 0xA82A);
  93.  
  94. #endif
  95.  
  96. #if PRAGMA_ALIGN_SUPPORTED
  97. #pragma options align=reset
  98. #endif
  99.  
  100. #if PRAGMA_IMPORT_SUPPORTED
  101. #pragma import off
  102. #endif
  103.  
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107.  
  108. #endif /* __OSAGENERIC__ */
  109.  
  110.